package com.awesome.spring.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * Order
 *
 * @author alex
 * @date 2022/07/07
 */
@Data
@TableName("transaction_message") // 指定数据库表名
public class TransactionMessage {

    @TableId(type = IdType.AUTO)  // 主键自增
    private Long id;

    private String topic;

    private String messageBody;

    @TableField(value = "STATUS") // 由于 status 是关键字，可显式指定列名
    private Integer status; // 0: 待发送, 1: 已发送

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


}